A shameless selfish special case. Base tiger pushpin color on age
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 15 Jan 2003 17:03:47 +0000 (17:03 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 15 Jan 2003 17:03:47 +0000 (17:03 +0000)
of waypoint creation.  < 2 weeks == green.

gpsbabel/tiger.c

index d56c1832fa9d701ab205f4dcba5be3fcd8250641..b096875d7b8d039722fe9961707b7940cf32a76d 100644 (file)
@@ -81,9 +81,15 @@ data_read(void)
 static void
 gpsutil_disp(const waypoint *wpt)
 {
-       fprintf(file_out, "%f,%f:redpin:%s\n", 
+       char *pin;
+       if (wpt->creation_time > time(0) - 3600 * 24 * 14)
+               pin = "greenpin";
+       else
+               pin = "redpin";
+       fprintf(file_out, "%f,%f:%s:%s\n", 
                wpt->position.longitude.degrees,
                 wpt->position.latitude.degrees,
+                pin,
                 wpt->description);
 }